﻿@model TinyLibraryCQRS.Presentations.Mvc3.Common.QueryServices.UserAccountDataObject

@{
    ViewBag.Title = "Account - Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Edit - @Html.DisplayFor(model => model.UserName)</legend>

        <div class="editor-label">
            Display Name
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DisplayName)
            @Html.ValidationMessageFor(model => model.DisplayName)
        </div>

        <div class="editor-label">
            Email
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            Contact Phone
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ContactPhone)
            @Html.ValidationMessageFor(model => model.ContactPhone)
        </div>
        <br />
        <fieldset>
        <legend>Address Information</legend>
        <div class="editor-label">
            Country
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AddressCountry)
            @Html.ValidationMessageFor(model => model.AddressCountry)
        </div>

        <div class="editor-label">
            State / Province
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AddressState)
            @Html.ValidationMessageFor(model => model.AddressState)
        </div>

        <div class="editor-label">
            City
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AddressCity)
            @Html.ValidationMessageFor(model => model.AddressCity)
        </div>

        <div class="editor-label">
            Street
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AddressStreet)
            @Html.ValidationMessageFor(model => model.AddressStreet)
        </div>

        <div class="editor-label">
            Zip
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AddressZip)
            @Html.ValidationMessageFor(model => model.AddressZip)
        </div>
        </fieldset>

        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.AggregateRootId)

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back", "MyAccount")
</div>
